{% extends "ErpBundle::layout.html.twig" %}
{% block title %}{{ parent() }} - QCM{% endblock %}
{% block body %}
	<script type="text/javascript">
	$(document).ready(function(){

	});
	</script>
	<h1>QCM List</h1>
	{% for q in qcm %}
		{{ q.id }} = {{ q.titre }} ( {{ q.id_prof }}  )<br/>
	{% endfor %}

	<h1>Test QCM</h1>

	{% if data != "" %}	
		<h2>Have data !</h2>
		{% for q in data %}
			<b>Question :</b>{{ q.question }}
			<br/>
			<b>Réponses :</b><br/>
			{% for r in q.reponses %}
				&nbsp; &nbsp; &nbsp; {{ r }}<br/>
			{% endfor %}
		{% endfor %}
	{% else %}
		<h2>No data</h2>
	{% endif %}
	<hr/>
	<form>
		<textarea name="text" cols="100" rows="20">{{ query }}</textarea>
		<button type="submit">Sauver</button>
	</form>
{% endblock %}
